package com.das.extservice.connector;

import java.util.List;
import java.util.Map;

import com.das.exception.DsConnectorException;

/**
 * 
 * @author chihang
 * 这个类是数据源接入实例的基类
 *
 */
public abstract class DsConnector {
	/*
	 * 数据源的主机ip
	 */
	protected String host;
	
	/*
	 * 数据源的服务端口
	 */
	protected int port;
	
	/*
	 * 数据源的访问用户名
	 */
	protected String visitName;
	
	/*
	 * 访问数据源用户的口令
	 */
	protected String visitPasswd;

	public DsConnector(String host, String visitName, String visitPasswd) {
		this.host = host;
		this.visitName = visitName;
		this.visitPasswd = visitPasswd;
	}
	
	public DsConnector(String host, int port, String visitName, String visitPasswd) {
		this.host = host;
		this.port = port;
		this.visitName = visitName;
		this.visitPasswd = visitPasswd;
	}
	
	public abstract List<String> fetch() throws DsConnectorException;
}
